/**
 * @Project TMHSCFX
 * @Author Tran Manh Hung
 * @Email: hungtmit@gmail.com | tmh@xwebgate.com
 * @Copyright © 2011 TMH. All rights reserved
 * @Createdate Apr 14, 2011
 * @Createtime 10:57:55 AM
 */

package com.tmh.study.fAS3AMTM.chap4
{
	import flash.display.Bitmap;
	import flash.display.Sprite;
	import flash.events.Event;

	public class EmbedAsset extends Sprite
	{

		[Embed(source="assets/picture.jpg")]
		private var ImageEmbed:Class;

		public function EmbedAsset()
		{
			super();
			addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
		}

		private function addedToStageHandler(event:Event):void
		{
			initData();
		}

		private function initData():void
		{
			var img:Bitmap = new ImageEmbed();
			addChild(img);
		}
	}
}